#include <stdio.h>
#include <conio.h>
int main()
{
        int i, a, b, c;
        int sum[28] = {0};
        unsigned count = 0;
        for (a = 0; a <= 9; ++a)
        {
                for (b = 0; b < a; ++b)
                {
                        for (c = 0; c < b; ++c)
                        {
                             sum[a + b + c] += 6;
                        }
                        sum[2*a + b] += 3;
                        sum[a + 2*b] += 3;
                }
                ++sum[3*a];
        }
        for (i = 0; i < 28; ++i)
                count += sum[i] * sum[i];
        printf("%u\n", count);
        getch();
        return 0;
}
